package com.onpositive.simple.persistance;

abstract class SearchIndex<K> {
	
	public SearchIndex( Class<K> clazz )
	{
		this.indexClass = clazz ;
	}
	
	Class<K> indexClass ;
	
//	public void submitObject( Object key, int id )
//	{
//		submitObjectByKey( indexClass.cast(key), id ) ;
//	}
//	
//	public void removeObject( Object key, int id )
//	{
//		removeObjectByKey( indexClass.cast(key), id ) ;
//	}
	
	//abstract protected void submitObjectByKey( K key, int id ) ;
	//abstract protected void removeObjectByKey( K key, int id ) ;
	
	abstract protected void submitObject( int keyId, int id ) ;
	abstract protected void removeObject( int keyId, int id ) ;

	
	abstract int[] query( boolean requiresSubinterval,	boolean includeLowerBound,	boolean includeUpperBound,
						  Object lowerBound, Object upperBound, Object targetValue ) ;
}
